/* GUI CONVERTED from ecpsfm02.p (converter v1.75) Mon Aug 14 12:27:53 2000 */
/* ecpsfm02.p - BOM SUMMARY SUB-ROUTINE                                  */
/* Copyright 1986-2002 QAD Inc., Carpinteria, CA, USA.                   */
/* All rights reserved worldwide.  This is an unpublished work.          */
/* web convert ecpsfm02.p (converter v1.00) Mon Oct 06 14:21:50 1997 */
/* web tag in ecpsfm02.p (converter v1.00) Mon Oct 06 14:18:05 1997 */
/*K0M7*/ /*V8#ConvertMode=WebReport                            */
/*V8:ConvertMode=Report                                                  */
/* REVISION: 7.4       LAST EDIT: 04/23/95      MODIFIED BY: QZL *H0DB*  */
/* REVISION: 8.6       LAST EDIT: 10/08/97      MODIFIED BY: mzv *K0M7*  */
/* REVISION: 8.6       LAST EDIT: 05/29/98      MODIFIED BY: *K1R6* A.Shobha*/
/* REVISION: 8.6   LAST MODIFIED: 01/28/99      BY: *K1Z2* Santhosh Nair */
/* REVISION: 9.1   LAST MODIFIED: 08/14/00      BY: *N0KW* Jacolyn Neder    */

/*GUI preprocessor directive settings */
&SCOPED-DEFINE PP_GUI_CONVERT_MODE REPORT

     {mfdeclre.i}
/*K1R6 /*K0M7*/ {wbrp02.i}*/


     define input parameter comp like ps_comp.

     define shared variable ecmnbr like ecm_nbr.

     define variable qty as decimal initial 1 no-undo.
     define variable level as integer initial 1 no-undo.
     define variable record as integer extent 1000 no-undo.
     define variable save_qty as decimal extent 1000 no-undo.
     define variable i as integer no-undo.
     define variable effstart as date no-undo.
     define variable effend as date no-undo.
     define variable eff_start as date extent 1000 no-undo.
     define variable eff_end as date extent 1000 no-undo.
     define variable par like ps_par no-undo.
     define variable ecmeffdate like ecm_eff_date no-undo.
     define variable ecmreldate like ecm_rel_date no-undo.

     define buffer ecd1 for ecd1_det.
/*K1Z2**    define shared workfile psmstr like ps_mstr.    */
/*K1Z2*/    define shared temp-table psmstr like ps_mstr.

     {mfdel.i pk_det "where pk_user = mfguser"}

     find ecm_mstr where ecm_nbr = ecmnbr no-lock no-error.
     if ecm_eff_date = ? then do:
        {ececrp2b.i psmstr}
     end.
     else do:
        {ececrp2b.i ps_mstr}
     end.
/*K1R6 /*K0M7*/ {wbrp04.i} */
